/*
 *  player.cpp
 */

#include <string>
#include "../../common/src/session.h"
#include "player.h"

Player::Player(int playerID, Session* session, std::string name) {
    this->playerID = playerID;
    this->session = session;
    this->name = name;
    lives = INIT_LIVES;
    score = 0;
}

Player::~Player() {}

int Player::getID() {
    return playerID;
}

Session* Player::getSession() {
    return session;
}

std::string Player::getName() {
    return name;
}

int Player::getScore() {
    return score;
}

void Player::addScore(int points) {
    score += points;
}

void Player::resetScore() {
    score = 0;
}

int Player::getLives() {
    return lives;
}

void Player::resetLives() {
    lives = INIT_LIVES;
}

void Player::subtractLife() {
    --lives;
}

//{+}

